.TH qdqueue_enqueue 3 "APRIL 2011" libqthread "libqthread"
.SH NAME
.BR qdqueue_enqueue " \- append an element to a distributed queue"
.SH SYNOPSIS
.B #include <qthread/qdqueue.h>

.I int
.br
.B qdqueue_enqueue
.RI "(qdqueue_t *" q ", void *" elem );
.PP
.I int
.br
.B qdqueue_enqueue_there
.RI "(qdqueue_t *" q ", void *" elem ,
.ti +23
.RI "qthread_shepherd_id_t " there );
.SH DESCRIPTION
These two functions append elements to distributed queues. The
.BR qdqueue_enqueue ()
function is equivalent to
.BR qdqueue_enqueue_there ()
when the
.I there
location is the current shepherd (e.g. the result of
.BR qthread_shep (NULL)).
.SH RETURN VALUE
The return value will be 0 for success, or will indicate an error.
.SH ERROR CODES
Possible error codes are:
.TP 4
QTHREAD_BADARGS
This indicates that one of the input arguments was null.
.SH SEE ALSO
.BR qlfqueue_enqueue (3),
.BR qdqueue_create (3),
.BR qdqueue_enqueue (3),
.BR qdqueue_dequeue (3),
.BR qdqueue_empty (3)
